package com.fqh.service.impl;

import com.fqh.entity.InfoGroup;
import com.fqh.entity.Order1;
import com.fqh.entity.Orderinfo;
import com.fqh.mapper.OrderMapper;
import com.fqh.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order1> findAllOrder(int page, int limit) {
        page = (page - 1) * limit;
        return orderMapper.findAllOrder(page, limit);
    }

    @Override
    public Integer findCount() {
        return orderMapper.findCount();
    }

    @Override
    public void deleteById(Integer id) {
        orderMapper.deleteById(id);
    }

    @Override
    public List<InfoGroup> orderInfo(String orderNum) {
        return orderMapper.orderInfo(orderNum);
    }
}
